package com.kgc.scd.service;

import com.kgc.scd.bean.CollectProducts;
import com.kgc.scd.bean.Foots;
import com.kgc.scd.util.PageSupport;
import com.kgc.scd.util.RequestResult;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created On : 2022/6/18.
 * <p>
 * Author     : 15950526365
 * <p>
 * Description: 收藏和足迹的接口
 */
@FeignClient(value = "blmall-server-liqiang-8105")
public interface CollectionService {
    /*
     * @author : 15950526365
     * @date   : 2022/6/15
     * @param  : [java.lang.String, java.lang.String]
     * @return : com.kgc.scd.util.RequestResult<java.util.Map<java.lang.String,java.lang.Object>>
     * @description : 收藏的添加功能
     */
    @PostMapping("/collections")
    public RequestResult<Map<String, Object>> collections(@RequestParam("userId") String userId, @RequestParam("proId") String proId);

    /**
     * @param : []
     * @return : com.kgc.scd.util.RequestResult<java.util.List<com.kgc.scd.bean.Cart>>
     * @author : 98730
     * @date : 2022/6/10
     * @description : 显示收藏列表，每页3条数据
     */
    @PostMapping("/queryCart")
    public RequestResult<PageSupport<CollectProducts>> queryCartListByPage(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize, @RequestParam("userId") String userId,@RequestParam("orderBy")Integer orderBy);
    /*
     * @author : 15950526365
     * @date   : 2022/6/15
     * @param  : [java.lang.String, java.util.List<java.lang.String>]
     * @return : com.kgc.scd.util.RequestResult<java.lang.String>
     * @description : 批量删除商品
     */

    @PostMapping("/delCollectList")
    public RequestResult<String> delCollectList(@RequestParam("userId") String userId, @RequestParam("proIds") List<String> proIds);

    /*
     * @author : 15950526365
     * @date   : 2022/6/15
     * @param  : [java.lang.Integer, java.lang.Integer]
     * @return : com.kgc.scd.util.RequestResult<java.util.Map<java.lang.String,java.lang.Object>>
     * @description : 足迹的添加与查看 对redis 操作大于五条数据进行删除
     */

    @PostMapping("/requestFoot")
    public RequestResult<List<Foots>> requestFoot(@RequestParam("userId") String userId, @RequestParam("proId") String proId);
    /*
     * @author : 15950526365
     * @date   : 2022/6/15
     * @param  :
     * @return :
     * @description : 足迹功能显示
     */
    @PostMapping("/selectFoots")
    public RequestResult<PageSupport<Foots>> selectFoots(@RequestParam("pageNo") Integer pageNo, @RequestParam("pageSize") Integer pageSize, @RequestParam("userId") String userId);

    /*
     * @author : 15950526365
     * @date   : 2022/6/16
     * @param  :
     * @return :
     * @description :  足迹满足5条开始进行删除足迹功能
     */
    @PostMapping("/delectFoots")
    public void delectFoots(@RequestParam("userId" ) String userId, @RequestParam("prodId") Integer prodId);



    /**
     * @author : 15950526365
     * @date   : 2022/6/21
     * @param  :
     * @return :
     * @description :  清除足迹
     */
    @PostMapping("/clearFoot")
    public RequestResult<Object> clearFoot(@RequestParam("userId") String userId);


    /**
     * @author : 15950526365
     * @date   : 2022/6/21
     * @param  :
     * @return :
     * @description :  清除收藏
     */
    @PostMapping("/clearCollection")
    public  RequestResult<Object> clearCollection(@RequestParam("userId") String userId);




}
